package edu.pku.sei.mdabase.basictypes;

import edu.pku.sei.mdabase.core.IDataType;


public abstract class PrimitiveType implements IDataType {

	public void setName(String name) {
	}
	
	public boolean isPrimitive() {
		return true;
	}
	
	@Override
	public String toString() {
		return getName();
	}
	

	public boolean isA(IDataType type){
		return type==this;
	}
	
	abstract public Object toValue(String text);

	public final static StringType TYPE_STRING = new StringType();
	public final static IntegerType TYPE_INTEGER = new IntegerType();
	public final static BooleanType TYPE_BOOLEAN = new BooleanType();
}
